#include <stdio.h>
#include <string.h>
#define NameSize 20

typedef int* IntPtr;

struct Student
{
    char Name[NameSize];
    int Score;
    int class;

};

typedef struct Student Stu;

void InitStu(Stu* s,const char *Name,int Score,int class)
{
    strcpy(s->Name,Name);
    s->class = class;
    s->Score = Score;
}

int main()
{
    // //初始化
    // Stu s = {"zhangsan",100,9};
    // printf("name : %s scoce : %d class : %d\n",s.Name, s.Score, s.class);
    
    // //可以直接赋值修改
    // s.Score = 90;
    // s.class = 10;
    // //修改名字要用字符串指针char *Name
    // //不然只能拷贝进去
    // strcpy(s.Name,"lisi");
    // printf("name : %s scoce : %d class : %d\n",s.Name, s.Score, s.class);

    // strcpy(s[0].Name,"zhangsan");
    // s[0].Score = 100;
    // s[0].class = 10;
    // printf("name : %s score : %d class : %d\n",s[0].Name,s[0].Score,s[0].class);
    
    Stu s[3];
    InitStu(s,"zhangsan",100,10);
    PrintStu(s);

    InitStu(s+1,"lisi",100,10);
    PrintStu(s+1);

    InitStu(s+2,"wangwu",100,10);
    PrintStu(s+2);
    
    return 0;
}